﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace SVAP
{
    public partial class AddConfigResult : Form
    {
        private static string strExePath = "";//应用程序所在路径

        private static string strSourcePath;//配置文件路径

        public AddConfigResult()
        {
            InitializeComponent();
        }

        private void AddConfigResult_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string strExePath = System.AppDomain.CurrentDomain.BaseDirectory;
            strExePath += @"\ResultConfig.txt";
            FileStream fs = new FileStream(strExePath, FileMode.Append);
            StreamWriter sw = new StreamWriter(fs,Encoding.Default);
            sw.WriteLine(textBox1.Text);

            ResultConfigForm rcf = new ResultConfigForm();
            rcf = (ResultConfigForm)this.Owner;
            rcf.listBox_showResult.Items.Add(textBox1.Text);

            sw.Flush();
            sw.Close();
            fs.Close();
            
            this.Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
